Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Make the timeline less noisy for screen readers #3007

Merged
merged 3 commits into from
May 22, 2019

Conversation

turt2live
Copy link
Member

There's some room for improvement here: we could be making the reader say "You sent a message at 18:46 [body]" or "TravisR sent a message at 18:46 [body]" to make it clearer. Currently it'll read out the sender profile if it is available, and if not just the timestamp + message. This improvement is best left to a future PR though.

Fixes element-hq/element-web#2716
Fixes element-hq/element-web#5697
See element-hq/element-web#9747

turt2live added 3 commits May 21, 2019 18:55
To have less noise when they run over the sender profile.

See element-hq/element-web#9747
This reduces overall noise from the screen reader. It was reading the alt attribute from the sender avatar, which was just a mxid. The read receipts were just nonsensical noise.

Fixes element-hq/element-web#2716
Fixes element-hq/element-web#5697
See element-hq/element-web#9747
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! 😁

? <MessageTimestamp
showTwelveHour={this.props.isTwelveHour}
ts={this.props.mxEvent.getTs()}
ariaHidden={muteScreenReader}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, if it's muted when sending or sending is complete, when will it be read...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The life of an EventTile is 3 parts, where the third is when things are read out. The first stage is the sending state, which is easy to filter. When the event switches to sent, the tile unmounts and a new one is put in place with a null sending state. That state is replaced shortly after with a property update, which triggers a re-render where the screen reader picks up the text to read (the div is replaced).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my own understanding, what does "that state is replaced shortly after with a property update" mean? Which property updates...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mxEvent changes in the component's properties, which leads to an eventSendState change of null->sent

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I thought sent was first (while waiting for remote echo), then null was the last and final status...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently it's just not my day - you're right. Will open another PR to flip it around.

@turt2live turt2live merged commit 983214f into develop May 22, 2019
@turt2live turt2live deleted the travis/sr/mute-timeline branch May 22, 2019 15:55
@turt2live turt2live restored the travis/sr/mute-timeline branch May 22, 2019 21:17
@turt2live turt2live deleted the travis/sr/mute-timeline branch May 22, 2019 21:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Screen reader reads out my message twice when I send it Read receipts are noisy for screen readers
2 participants